# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-praw
_pkgname=praw
pkgver=6.4.0
pkgrel=1
pkgdesc="Python Reddit API Wrapper that allows for simple access to reddit's API."
arch=('any')
license=('GPL')
url='https://praw.readthedocs.org'
depends=('python2-prawcore' 'python2-update-checker' 'python2-websocket-client')
makedepends=('python2-setuptools' 'python2-pytest-runner')
checkdepends=('python2-mock' 'python2-betamax-serializers'
              'python2-betamax-matchers')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('9f7c0892aff25d44946e78446c8916e2812a9da37a9b2f77e56c78b20a7e9d7fa11240c6ee7910506bb1d858a6b937b44957d46cfe326f4553393898261db64f')

build() {
  cd "praw-$pkgver"

  python2 setup.py build
}

package() {
  cd "praw-$pkgver"

  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
}

